/*
 * @FileName: [ModuleEnum.java]
 * 
 * @Package com.bcinfo.upp.admin.common
 * 
 * 
 * Copyright (c) 2011-2015 BCINFO Technology Limited Com. All rights reserved.
 * 
 * This software is the confidential and proprietary information of BCINFO
 * Technology Limited Company ("Confidential Information"). You shall not
 * disclose such Confidential Information and shall use it only in accordance
 * with the terms of the contract agreement you entered into with RKY.
 * 
 * $Rev: 44 $ $LastChangedDate: 2013-10-12 10:19:57 +0800 (星期六, 12 十月 2013) $
 * $LastChangedBy: wanggc $
 * 
 * @category bcinfo-upp
 * 
 * @version 1.1
 * 
 * @author $Author: wanggc $
 * 
 * Change History:[Formatter: author date description] <br/> 1 2 3
 */

package com.bcinfo.iccard.admin.common;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 模块枚举类 <br/>
 * <p>
 * Description:<br/>
 * <p>
 * 定义了各个模块以及模块内的action操作
 * 
 * <p>
 * For Examples <br/>
 * 
 * <PRE>
 *      ModuleEnum.Operator.moduleName.value
 *      ModuleEnum.Operator.add
 * </PRE>
 * <p>
 */
public class ModuleEnum
{

    /**
     * 私有构造函数 <br/>
     * <p>
     * Description: 私有构造函数，防止实例化 <br/>
     * <p>
     * Author: yun <br/>
     * <p>
     * Date: 2013-4-26-下午11:05:42 <br/>
     * <p>
     */
    private ModuleEnum()
    {

    }

    public static enum Role
    {
        moduleName("ROLE_ADMIN");

        public static final String add    = "create_role";
        public static final String remove = "remove_role";
        public static final String auth   = "auth_role";
        public static final String update = "update_role";
        public static final String view   = "view_role";

        public String              value;

        Role(String value)
        {
            this.value = value;
        }
    }

    public static enum Operator
    {
        moduleName("OPERATOR_ADMIN");

        public static final String add       = "create_operator";
        public static final String remove    = "remove_operator";
        public static final String setStatus = "disable_enable_operator";
        public static final String update    = "update_operator";
        public static final String view      = "view_operator";
        public static final String resetPwd  = "reset_pwd_operator";

        public String              value;

        Operator(String value)
        {
            this.value = value;
        }
    }
    
    public static enum RechargeableCard
    {
        moduleName("rechargeablecard");

        public static final String add       = "create_rechargeablecard";
        public static final String remove    = "remove_rechargeablecard";
        public static final String outbound  = "outbound_rechargeablecard";
        public static final String view      = "view_rechargeablecard";
        
        public static final String activate  = "activate_rechargeablecard";
        public static final String recharge  = "recharge_rechargeablecard";
        
        public static final String canceledCardInfo = "canceledCardInfo_rechargeablecard";
        public static final String cancelation  = "cancelation_rechargeablecard";

        public static final String singlecardSearch  = "singlecardSearch_rechargeablecard";
        public static final String loadinfo  = "loadinfo";
        
        public String              value;

        RechargeableCard(String value)
        {
            this.value = value;
        }
    }
    
    public static enum ComboCard
    {
        moduleName("combocard");

        public static final String add       = "create_combocard";
        public static final String remove    = "remove_combocard";
        public static final String update    = "update_combocard";
        public static final String outbound  = "outbound_combocard";
        public static final String view      = "view_combocard";
        public static final String sale      = "sale_combocard";
        public static final String audit      = "audit_combocard";

        public String              value;

        ComboCard(String value)
        {
            this.value = value;
        }
    }

    public static enum Merchant
    {
        moduleName("merchant");

        public static final String add       = "create_merchant";
        public static final String remove    = "remove_merchant";
        public static final String update    = "update_merchant";
        public static final String outbound  = "outbound_merchant";
        public static final String view      = "view_merchant";
        public static final String audit      = "audit_merchant";
        public static final String billing      = "billing_merchant";//结算
        public static final String unbilling      = "billing_merchant";//暂不结算
        public static final String setStatus = "disable_enable_operator";//冻结//解冻
        public static final String changeStatus = "changeStatus";
        
        public static final String exportReport = "exportReport";
        public static final String exportReportAll = "exportReportAll";
        

        public String              value;

        Merchant(String value)
        {
            this.value = value;
        }
    }
    
    public static enum FinancialManage
    {
        moduleName("financialManage");

//        public static final String add       = "create_merchant";
//        public static final String remove    = "remove_merchant";
//        public static final String update    = "update_merchant";
//        public static final String outbound  = "outbound_merchant";
//        public static final String view      = "view_merchant";
//        public static final String audit      = "audit_merchant";
//        public static final String billing      = "billing_merchant";//结算
//        public static final String unbilling      = "billing_merchant";//暂不结算
//        public static final String disable = "disable_merchant";//冻结
//        public static final String enable = "enable_merchant";//解冻

        public String              value;

        FinancialManage(String value)
        {
            this.value = value;
        }
    }


    
    public static enum Org
    {
        moduleName("ORG_ADMIN");

        public static final String add    = "create_org";
        public static final String remove = "remove_org";
        public static final String view   = "view_org";
        public static final String update = "update_org";

        public String              value;

        Org(String value)
        {
            this.value = value;
        }
    }

    public static enum SysParam
    {
        moduleName("SYS_PARAMS_ADMIN");

        public static final String view   = "view_sys_params";
        public static final String update = "update_sys_params";

        public String              value;

        SysParam(String value)
        {
            this.value = value;
        }
    }

    public static enum Catalog
    {
        moduleName("CUSTOM_CATALOG_ADMIN");

        public static final String add    = "create_custom_catalog";
        public static final String remove = "remove_custom_catalog";
        public static final String view   = "view_custom_catalog";
        public static final String update = "update_custom_catalog";

        public String              value;

        Catalog(String value)
        {
            this.value = value;
        }
    }

    public static enum Audit
    {
        moduleName("AUDIT_ADMIN");

        public static final String view = "view_log";

        public String              value;

        Audit(String value)
        {
            this.value = value;
        }
    }

    public static enum Visit
    {
        moduleName("VISIT_ADMIN");

        public static final String login  = "login";
        public static final String logout = "logout";

        public String              value;

        Visit(String value)
        {
            this.value = value;
        }
    }

    public static enum FileUpload
    {
        moduleName("FILE_UPLOAD_ADMIN");

        public String value;

        FileUpload(String value)
        {
            this.value = value;
        }
    }

    public static enum AcResource
    {
        moduleName("AC_RESOURCE_ADMIN");

        public static final String view = "view_ac_resource";

        public String              value;

        AcResource(String value)
        {
            this.value = value;
        }
    }
    
    public static final Map<String, String> UPP_MODULE_MAP = new ConcurrentHashMap<String, String>(
                                                                   new LinkedHashMap<String, String>());

    static
    {
        UPP_MODULE_MAP.put(Role.moduleName.value, "角色模块");
        UPP_MODULE_MAP.put(Operator.moduleName.value, "帐号模块");
        UPP_MODULE_MAP.put(Org.moduleName.value, "组织模块");

        UPP_MODULE_MAP.put(SysParam.moduleName.value, "系统参数模块");

        UPP_MODULE_MAP.put(Audit.moduleName.value, "审计模块");

        UPP_MODULE_MAP.put(FileUpload.moduleName.value, "上传模块");
        UPP_MODULE_MAP.put(AcResource.moduleName.value, "受控资源模块");
    }
}